package com.workcell.workdata.im.model.vo;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;
import java.util.Map;

public class AccountDataVO {

    @ApiModelProperty("我相关的群列表")
    private List<GroupVO> groupList;

    @ApiModelProperty("仅仅是好友列表")
    private List<UserVO> friendList;

    @ApiModelProperty("仅仅是组织成员列表")
    private List<UserVO> contactList;

    @ApiModelProperty("组织成员又是好友列表")
    private List<UserVO> bothList;

    @ApiModelProperty("关注的公众号列表")
    private List<MicroServerVO> microServerList;

    @ApiModelProperty("忽略TA的朋友圈UID列表")
    private List<Long> momentIgnoreList;

    @ApiModelProperty("表情包列表")
    private List<EmoticonVO> emoticonList;

    @ApiModelProperty("我的组织")
    private OrganizationVO organization;

    public List<GroupVO> getGroupList() {
        return groupList;
    }

    public void setGroupList(List<GroupVO> groupList) {
        this.groupList = groupList;
    }

    public List<UserVO> getFriendList() {
        return friendList;
    }

    public void setFriendList(List<UserVO> friendList, Map<Long,String> aliasMap) {
        this.mappingAliasName(friendList,aliasMap);
        this.friendList = friendList;
    }

    public List<UserVO> getContactList() {
        return contactList;
    }

    public void setContactList(List<UserVO> contactList, Map<Long,String> aliasMap) {
        this.mappingAliasName(contactList,aliasMap);
        this.contactList = contactList;
    }

    public List<UserVO> getBothList() {
        return bothList;
    }

    public void setBothList(List<UserVO> bothList, Map<Long,String> aliasMap) {
        this.mappingAliasName(bothList,aliasMap);
        this.bothList = bothList;
    }

    public List<MicroServerVO> getMicroServerList() {
        return microServerList;
    }

    public void setMicroServerList(List<MicroServerVO> microServerList) {
        this.microServerList = microServerList;
    }

    public List<EmoticonVO> getEmoticonList() {
        return emoticonList;
    }

    public void setEmoticonList(List<EmoticonVO> emoticonList) {
        this.emoticonList = emoticonList;
    }

    public OrganizationVO getOrganization() {
        return organization;
    }

    public void setOrganization(OrganizationVO organization) {
        this.organization = organization;
    }

    public List<Long> getMomentIgnoreList() {
        return momentIgnoreList;
    }

    public void setMomentIgnoreList(List<Long> momentIgnoreList) {
        this.momentIgnoreList = momentIgnoreList;
    }

    private void mappingAliasName(List<UserVO> vos, Map<Long,String> aliasMap){
        for (UserVO vo : vos){
            vo.setAlias(aliasMap.get(vo.getId()));
        }
    }
}
